package com.hunktimes.wholesale.vm

import androidx.lifecycle.MutableLiveData
import com.hunktimes.wholesale.base.BaseViewModel
import com.hunktimes.wholesale.extension.launch
import com.hunktimes.wholesale.net.WholeSaleRepository

/**
 * Author: Delete
 * Date: 2020/8/12 11:42
 * Description:
 *
 */
class OrderVM : BaseViewModel() {
    val ordersResult = MutableLiveData<List<String>>()

    fun queryOrderByType(type: String) {
        launch({
            val resp = WholeSaleRepository.queryOrdersByType(type)
            val orders = resp.data
            orders?.let {
                ordersResult.value = it
            }
        })

    }
}